#include<bits/stdc++.h>
using namespace std;

int n;
int r[100002];
int ans,f;

int main(){
	
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	
	cin>>n;
	for(int i=1;i<=n;i++)cin>>r[i];
	sort(r+1,r+n+1);
	
	ans=n;
	f=n;
	for(int i=1;i<=n;i++){
		if(r[i]>r[1]){
			f=i;
			break;
		}
	}
	
	for(int i=1,j=f;j<=n;){
		if(r[i]<r[j]){
			ans--;
			i++;
			j++;
		}else j++;
	}
	cout<<ans;
	
	return 0;
}
